﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Platform.Amazon.Model {
    public class Feed {
        public static Feed Product;

        public static Feed Relationship;

        public static Feed ProductImage;

        public static Feed Price;

        public static Feed Inventory;

        public static Feed OrderFulfillment;

        public static Feed OrderAcknowledgement;

        public static Feed OrderAdjustment;

        public static Feed ProcessingReport;

        public static Feed Delete;

        public readonly string Title;

        public readonly string Name;

        public readonly string AFeed;

        public readonly int Value;

        private Feed(string title, string name, string feed, int value) {
            Title = title;
            Name = name;
            AFeed = feed;
            Value = value;
        }

        public static Feed Create(int type) {
            switch (type) {
                default:
                    return Product;
                case 99:
                    return Delete;
                case 1:
                    return Product;
                case 2:
                    return Relationship;
                case 3:
                    return ProductImage;
                case 4:
                    return Price;
                case 5:
                    return Inventory;
                case 6:
                    return OrderFulfillment;
                case 7:
                    return OrderAcknowledgement;
                case 8:
                    return OrderAdjustment;
            }
        }

        static Feed() {
            Product = new Feed("产品", "Product", "_POST_PRODUCT_DATA_", 1);
            Relationship = new Feed("关系", "Relationship", "_POST_PRODUCT_RELATIONSHIP_DATA_", 2);
            ProductImage = new Feed("图片", "ProductImage", "_POST_PRODUCT_IMAGE_DATA_", 3);
            Price = new Feed("价格", "Price", "_POST_PRODUCT_PRICING_DATA_", 4);
            Inventory = new Feed("库存", "Inventory", "_POST_INVENTORY_AVAILABILITY_DATA_", 5);
            OrderFulfillment = new Feed("送货", "OrderFulfillment", "_POST_ORDER_FULFILLMENT_DATA_", 6);
            OrderAcknowledgement = new Feed("确认", "OrderAcknowledgement", "_POST_ORDER_ACKNOWLEDGEMENT_DATA_", 7);
            OrderAdjustment = new Feed("调整", "OrderAdjustment", "_POST_PAYMENT_ADJUSTMENT_DATA_", 8);
            ProcessingReport = new Feed("报告", "ProcessingReport", "", 9);
            Delete = new Feed("删除", "Product", "_POST_PRODUCT_DATA_", 99);
        }
    }
}
